<?php
/**
 * Created by lzl
 * Date: 2021 2021/9/18
 * Time: 10:53
 */
namespace App\Http\Controllers\Admin;


use App\Forms\ExpressForms;

class StoreController extends Controller
{

    /**
     * 物流信息
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View|mixed
     * @throws \App\Exceptions\RequestException
     */
    public function express()
    {
        if($this->request->ajax()) {
            $rules = [
                'page'       => 'required',
                'limit'      => 'required',
            ];

            $this->validateInput($rules);

            return $this->showJsonLayui((new ExpressForms())->getExpressList($this->validated));
        }

        return $this->view('store.express');
    }


    /**
     * 更新快递信息
     * @return mixed
     * @throws \App\Exceptions\RequestException
     */
    public function expressEdit()
    {
        $rules = [
            'id' => 'required|integer',
            'status' => 'required|in:1,0'
        ];

        $this->validateInput($rules);

        return $this->success((new ExpressForms())->editExpress($this->validated));
    }



}